Computer users today desire optimum performance from their computer system. Where before it may have been acceptable to wait long periods of time for data operations between the user and the computer system to complete, users today will not tolerate noticeably poor performance. The goal of computer designers is to make computer systems appear to the user to be quick and responsive instead of slow and underpowered.
A special challenge to computer designers is to minimize the apparent time it takes to read and write data to and from auxiliary storage. Auxiliary storage, such as magnetic or optical disk, is notoriously slow. Reading and writing data to and from auxiliary storage is especially problematic in database and image applications, where large amounts of data need to be inserted into and retrieved from a database located on auxiliary storage. Computer users running database applications desire quick access to the data in the database and do not want to wait a long period of time to gain this access. It is desirable to perform as much work as possible in parallel with I/O operations to and from auxiliary storage This allows the user to perform other tasks instead of waiting for the I/O operation to complete.
Most computer systems today use buffers to page data into and out of auxiliary storage. The buffers are located in a faster memory area, such as main storage. Some computer systems use a double buffering scheme. When a user wants to send data to auxiliary storage, the first buffer is filled with data and its contents are asynchronously written to auxiliary storage. Without waiting for the asynchronous write to complete the second buffer is filled with data. When the second buffer is filled, the contents of the second buffer are asynchronously written to auxiliary storage. Assuming the first buffer has completed its write operation, the first buffer is filled with new data and another asynchronous write operation is performed. Control switches back and forth between these two buffers until all of the desired data is sent to auxiliary storage.
While this double buffering scheme does improve performance for a steady state environment, it does not optimize performance for each unique and dynamically changing computer environment. In addition, poor choice of the size of these buffers may adversely impact the performance of the computer system. If the buffers are too small, the first buffer will not complete its write operation before the second buffer is full In this case, the computer system must waste time synchronously waiting for the first write operation to complete before the first buffer can be filled with new data. Synchronous waits are undesirable since they increase the overall elapsed time of batch jobs and increase the response time of interactive jobs. This can be very visible and annoying to the user. Synchronous waits can be minimized or even eliminated if the buffers are made bigger. But if the buffers are too big, time is wasted filling buffers, and data is not written to or read from auxiliary storage as fast as it could be. In addition, valuable memory in main storage that could be used more effectively by other processing is tied up and wasted if the buffers are too big.
The goal is to make the buffers not too small or too big, but just right. If computer designers attempt to preset the size of the buffers, they cannot take into account each user's unique and dynamic computer environment. The buffers may be the right size for some of the users some of the time, but will not be the right size for all of the users all of the time.